Integrand size = 21, antiderivative size = 302 \[ \int \cos ^m(c+d x) (a+a \cos (c+d x))^4 \, dx=\frac {a^4 \left (55+29 m+4 m^2\right ) \cos ^{1+m}(c+d x) \sin (c+d x)}{d (2+m) (3+m) (4+m)}+\frac {\cos ^{1+m}(c+d x) \left (a^2+a^2 \cos (c+d x)\right )^2 \sin (c+d x)}{d (4+m)}+\frac {2 (5+m) \cos ^{1+m}(c+d x) \left (a^4+a^4 \cos (c+d x)\right ) \sin (c+d x)}{d (3+m) (4+m)}-\frac {a^4 \left (35+40 m+8 m^2\right ) \cos ^{1+m}(c+d x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1+m}{2},\frac {3+m}{2},\cos ^2(c+d x)\right ) \sin (c+d x)}{d (1+m) (2+m) (4+m) \sqrt {\sin ^2(c+d x)}}-\frac {4 a^4 (5+2 m) \cos ^{2+m}(c+d x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {2+m}{2},\frac {4+m}{2},\cos ^2(c+d x)\right ) \sin (c+d x)}{d (2+m) (3+m) \sqrt {\sin ^2(c+d x)}} \]
[Out]
Time = 0.60 (sec) , antiderivative size = 302, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {2842, 3055, 3047, 3102, 2827, 2722} \[ \int \cos ^m(c+d x) (a+a \cos (c+d x))^4 \, dx=-\frac {a^4 \left (8 m^2+40 m+35\right ) \sin (c+d x) \cos ^{m+1}(c+d x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {m+1}{2},\frac {m+3}{2},\cos ^2(c+d x)\right )}{d (m+1) (m+2) (m+4) \sqrt {\sin ^2(c+d x)}}-\frac {4 a^4 (2 m+5) \sin (c+d x) \cos ^{m+2}(c+d x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {m+2}{2},\frac {m+4}{2},\cos ^2(c+d x)\right )}{d (m+2) (m+3) \sqrt {\sin ^2(c+d x)}}+\frac {a^4 \left (4 m^2+29 m+55\right ) \sin (c+d x) \cos ^{m+1}(c+d x)}{d (m+2) (m+3) (m+4)}+\frac {2 (m+5) \sin (c+d x) \left (a^4 \cos (c+d x)+a^4\right ) \cos ^{m+1}(c+d x)}{d (m+3) (m+4)}+\frac {\sin (c+d x) \left (a^2 \cos (c+d x)+a^2\right )^2 \cos ^{m+1}(c+d x)}{d (m+4)} \]
[In]
[Out]
Rule 2722
Rule 2827
Rule 2842
Rule 3047
Rule 3055
Rule 3102
Rubi steps \begin{align*} \text {integral}& = \frac {\cos ^{1+m}(c+d x) \left (a^2+a^2 \cos (c+d x)\right )^2 \sin (c+d x)}{d (4+m)}+\frac {\int \cos ^m(c+d x) (a+a \cos (c+d x))^2 \left (a^2 (5+2 m)+2 a^2 (5+m) \cos (c+d x)\right ) \, dx}{4+m} \\ & = \frac {\cos ^{1+m}(c+d x) \left (a^2+a^2 \cos (c+d x)\right )^2 \sin (c+d x)}{d (4+m)}+\frac {2 (5+m) \cos ^{1+m}(c+d x) \left (a^4+a^4 \cos (c+d x)\right ) \sin (c+d x)}{d (3+m) (4+m)}+\frac {\int \cos ^m(c+d x) (a+a \cos (c+d x)) \left (a^3 \left (25+23 m+4 m^2\right )+a^3 \left (55+29 m+4 m^2\right ) \cos (c+d x)\right ) \, dx}{12+7 m+m^2} \\ & = \frac {\cos ^{1+m}(c+d x) \left (a^2+a^2 \cos (c+d x)\right )^2 \sin (c+d x)}{d (4+m)}+\frac {2 (5+m) \cos ^{1+m}(c+d x) \left (a^4+a^4 \cos (c+d x)\right ) \sin (c+d x)}{d (3+m) (4+m)}+\frac {\int \cos ^m(c+d x) \left (a^4 \left (25+23 m+4 m^2\right )+\left (a^4 \left (25+23 m+4 m^2\right )+a^4 \left (55+29 m+4 m^2\right )\right ) \cos (c+d x)+a^4 \left (55+29 m+4 m^2\right ) \cos ^2(c+d x)\right ) \, dx}{12+7 m+m^2} \\ & = \frac {a^4 \left (55+29 m+4 m^2\right ) \cos ^{1+m}(c+d x) \sin (c+d x)}{d (2+m) \left (12+7 m+m^2\right )}+\frac {\cos ^{1+m}(c+d x) \left (a^2+a^2 \cos (c+d x)\right )^2 \sin (c+d x)}{d (4+m)}+\frac {2 (5+m) \cos ^{1+m}(c+d x) \left (a^4+a^4 \cos (c+d x)\right ) \sin (c+d x)}{d (3+m) (4+m)}+\frac {\int \cos ^m(c+d x) \left (a^4 (3+m) \left (35+40 m+8 m^2\right )+4 a^4 (2+m) (4+m) (5+2 m) \cos (c+d x)\right ) \, dx}{24+26 m+9 m^2+m^3} \\ & = \frac {a^4 \left (55+29 m+4 m^2\right ) \cos ^{1+m}(c+d x) \sin (c+d x)}{d (2+m) \left (12+7 m+m^2\right )}+\frac {\cos ^{1+m}(c+d x) \left (a^2+a^2 \cos (c+d x)\right )^2 \sin (c+d x)}{d (4+m)}+\frac {2 (5+m) \cos ^{1+m}(c+d x) \left (a^4+a^4 \cos (c+d x)\right ) \sin (c+d x)}{d (3+m) (4+m)}+\frac {\left (4 a^4 (5+2 m)\right ) \int \cos ^{1+m}(c+d x) \, dx}{3+m}+\frac {\left (a^4 \left (35+40 m+8 m^2\right )\right ) \int \cos ^m(c+d x) \, dx}{8+6 m+m^2} \\ & = \frac {a^4 \left (55+29 m+4 m^2\right ) \cos ^{1+m}(c+d x) \sin (c+d x)}{d (2+m) \left (12+7 m+m^2\right )}+\frac {\cos ^{1+m}(c+d x) \left (a^2+a^2 \cos (c+d x)\right )^2 \sin (c+d x)}{d (4+m)}+\frac {2 (5+m) \cos ^{1+m}(c+d x) \left (a^4+a^4 \cos (c+d x)\right ) \sin (c+d x)}{d (3+m) (4+m)}-\frac {a^4 \left (35+40 m+8 m^2\right ) \cos ^{1+m}(c+d x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1+m}{2},\frac {3+m}{2},\cos ^2(c+d x)\right ) \sin (c+d x)}{d (1+m) \left (8+6 m+m^2\right ) \sqrt {\sin ^2(c+d x)}}-\frac {4 a^4 (5+2 m) \cos ^{2+m}(c+d x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {2+m}{2},\frac {4+m}{2},\cos ^2(c+d x)\right ) \sin (c+d x)}{d (2+m) (3+m) \sqrt {\sin ^2(c+d x)}} \\ \end{align*}
Time = 1.64 (sec) , antiderivative size = 282, normalized size of antiderivative = 0.93 \[ \int \cos ^m(c+d x) (a+a \cos (c+d x))^4 \, dx=\frac {a^2 \cos ^{1+m}(c+d x) \csc (c+d x) \left ((a+a \cos (c+d x))^2 \sin ^2(c+d x)-\frac {a^2 (5+2 m) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1+m}{2},\frac {3+m}{2},\cos ^2(c+d x)\right ) \sqrt {\sin ^2(c+d x)}}{1+m}-\frac {2 a^2 (10+3 m) \cos (c+d x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {2+m}{2},\frac {4+m}{2},\cos ^2(c+d x)\right ) \sqrt {\sin ^2(c+d x)}}{2+m}-\frac {a^2 (25+6 m) \cos ^2(c+d x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {3+m}{2},\frac {5+m}{2},\cos ^2(c+d x)\right ) \sqrt {\sin ^2(c+d x)}}{3+m}-\frac {2 a^2 (5+m) \cos ^3(c+d x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {4+m}{2},\frac {6+m}{2},\cos ^2(c+d x)\right ) \sqrt {\sin ^2(c+d x)}}{4+m}\right )}{d (4+m)} \]
[In]
[Out]
\[\int \left (\cos ^{m}\left (d x +c \right )\right ) \left (a +\cos \left (d x +c \right ) a \right )^{4}d x\]
[In]
[Out]
\[ \int \cos ^m(c+d x) (a+a \cos (c+d x))^4 \, dx=\int { {\left (a \cos \left (d x + c\right ) + a\right )}^{4} \cos \left (d x + c\right )^{m} \,d x } \]
[In]
[Out]
Timed out. \[ \int \cos ^m(c+d x) (a+a \cos (c+d x))^4 \, dx=\text {Timed out} \]
[In]
[Out]
\[ \int \cos ^m(c+d x) (a+a \cos (c+d x))^4 \, dx=\int { {\left (a \cos \left (d x + c\right ) + a\right )}^{4} \cos \left (d x + c\right )^{m} \,d x } \]
[In]
[Out]
\[ \int \cos ^m(c+d x) (a+a \cos (c+d x))^4 \, dx=\int { {\left (a \cos \left (d x + c\right ) + a\right )}^{4} \cos \left (d x + c\right )^{m} \,d x } \]
[In]
[Out]
Timed out. \[ \int \cos ^m(c+d x) (a+a \cos (c+d x))^4 \, dx=\int {\cos \left (c+d\,x\right )}^m\,{\left (a+a\,\cos \left (c+d\,x\right )\right )}^4 \,d x \]
[In]
[Out]